@import "./InvisibleTextStyles.css";

/* navigated */
:host([navigated]) .ui5-li-root .ui5-li-navigated {
	width: 0.1875rem;
	position: absolute;
	right: 0;
	top: 0;
	bottom: 0;
	background-color: var(--sapList_SelectionBorderColor);
}

/* active */
:host([active][actionable]) .ui5-li-root .ui5-li-icon {
	color: var(--sapList_Active_TextColor);
}

/* [ui5-li]: title, description, additionalTextState */
:host([active][actionable]) .ui5-li-title,
:host([active][actionable]) .ui5-li-desc,
:host([active][actionable]) .ui5-li-additional-text {
	color: var(--sapList_Active_TextColor);
}

:host([active][actionable]) .ui5-li-additional-text {
	text-shadow: none;
}

/* [ui5-li]: additionalTextState */
:host([additional-text-state="Critical"]) .ui5-li-additional-text {
	color: var(--sapCriticalTextColor);
}

:host([additional-text-state="Positive"]) .ui5-li-additional-text {
	color: var(--sapPositiveTextColor);
}

:host([additional-text-state="Negative"]) .ui5-li-additional-text {
	color: var(--sapNegativeTextColor);
}

:host([additional-text-state="Information"]) .ui5-li-additional-text {
	color: var(--sapInformativeTextColor);
}

/* [ui5-li]: item with title and description */
:host([has-title][description]) {
	height: 5rem;
}

:host([has-title][image]) {
	height: 5rem;
}

:host([_has-image]) {
	height: 5rem;
}

:host([image]) .ui5-li-content {
	height: 3rem;
}

::slotted(img[slot="image"]){
	width: var(--_ui5_list_item_img_size);
	height: var(--_ui5_list_item_img_size);
	border-radius: var(--ui5-avatar-border-radius);
	object-fit: contain
}

::slotted([ui5-icon][slot="image"]){
	color: var(--sapContent_NonInteractiveIconColor);
	min-width: var(--_ui5_list_item_icon_size);
	min-height: var(--_ui5_list_item_icon_size);
	padding-inline-end: var(--_ui5_list_item_icon_padding-inline-end);
}

::slotted([ui5-avatar][slot="image"]) {
	min-width: var(--_ui5_list_item_img_size);
	min-height: var(--_ui5_list_item_img_size);
	margin-top: var(--_ui5_list_item_img_top_margin);
	margin-bottom: var(--_ui5_list_item_img_bottom_margin);
	margin-inline-end: var(--_ui5_list_item_img_hn_margin);
}

:host([wrapping-type="None"][description]) .ui5-li-root {
	padding: 1rem;
}

:host([description]) .ui5-li-content {
	height: 3rem;
}

:host([has-title][description]) .ui5-li-title {
	padding-bottom: 0.5rem;
}

.ui5-li-text-wrapper {
	flex-direction: column;
}

:host([description]) .ui5-li-text-wrapper {
	justify-content: space-between;
	padding: 0.125rem 0;
}

.ui5-li-description-info-wrapper {
	display: flex;
	justify-content: space-between;
}

.ui5-li-additional-text,
:host(:not([wrapping-type="Normal"])) .ui5-li-title,
.ui5-li-desc {
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

:host([wrapping-type="Normal"]) {
	height: auto;
}

:host([wrapping-type="Normal"]) .ui5-li-content {
	margin: var(--_ui5_list_item_content_vertical_offset) 0;
}

.ui5-li-desc {
	color: var(--sapContent_LabelColor);
	font-size: var(--sapFontSize);
}

:host([description]) .ui5-li-additional-text {
	align-self: flex-end;
}

.ui5-li-icon {
	min-width: var(--_ui5_list_item_icon_size);
	min-height: var(--_ui5_list_item_icon_size);
	color: var(--sapContent_NonInteractiveIconColor);
	padding-inline-end: var(--_ui5_list_item_icon_padding-inline-end);
}

:host([icon-end]) .ui5-li-icon {
	padding-inline-start: var(--_ui5_list_item_icon_padding-inline-end);
}

.ui5-li-detailbtn,
.ui5-li-deletebtn {
	display: flex;
	align-items: center;
	margin-left: var(--_ui5_list_buttons_left_space);
}

.ui5-li-multisel-cb,
.ui5-li-singlesel-radiobtn {
	flex-shrink: 0;
}

:host([description]) .ui5-li-singlesel-radiobtn {
	align-self: flex-start;
	margin-top: var(--_ui5_list_item_selection_btn_margin_top);
}

:host([description]) .ui5-li-multisel-cb {
	align-self: flex-start;
	margin-top: var(--_ui5_list_item_selection_btn_margin_top);
}

:host([_selection-mode="SingleStart"][wrapping-type]) .ui5-li-root {
	padding-inline: 0 1rem;
}

:host([_selection-mode="Multiple"][wrapping-type]) .ui5-li-root {
	padding-inline: 0 1rem;
}

:host([_selection-mode="SingleEnd"][wrapping-type]) .ui5-li-root {
	padding-inline: 1rem 0;
}

:host [ui5-checkbox].ui5-li-singlesel-radiobtn {
	margin-right: var(--_ui5_list_item_cb_margin_right);
}

/* highlight */
.ui5-li-highlight {
	position: absolute;
	width: 0.375rem;
	bottom: 0;
	left: 0;
	top: 0;
	border-inline-end: 0.0625rem solid var(--ui5-listitem-background-color);
	box-sizing: border-box;
}

:host([highlight="Negative"]) .ui5-li-highlight {
	background: var(--sapErrorBorderColor);
}

:host([highlight="Critical"]) .ui5-li-highlight {
	background: var(--sapWarningBorderColor);
}

:host([highlight="Positive"]) .ui5-li-highlight {
	background: var(--sapSuccessBorderColor);
}

:host([highlight="Information"]) .ui5-li-highlight {
	background: var(--sapInformationBorderColor);
}

/* wrapping */
:host([wrapping-type="Normal"][description]),
:host([wrapping-type="Normal"][has-title][description]),
:host([wrapping-type="Normal"][has-title][image]) {
	height: auto;
	min-height: 5rem;
}

:host([wrapping-type="Normal"][description]) .ui5-li-content,
:host([wrapping-type="Normal"][image]) .ui5-li-content {
	height: auto;
	min-height: 3rem;
}

:host([wrapping-type="Normal"][has-title][description]) .ui5-li-title {
	padding-bottom: .75rem;
}

:host([wrapping-type="Normal"][additional-text]) .ui5-li-additional-text {
	padding-inline-start: .75rem;
}

:host([wrapping-type="Normal"]) .ui5-li-description-info-wrapper {
	flex-direction: column;
}

:host([wrapping-type="Normal"]) .ui5-li-description-info-wrapper .ui5-li-additional-text {
	white-space: normal;
}

:host([wrapping-type="Normal"]) .ui5-li-multisel-cb,
:host([wrapping-type="Normal"]) .ui5-li-singlesel-radiobtn {
	display: flex;
	align-self: flex-start;
}

:host([wrapping-type="Normal"][description]) .ui5-li-multisel-cb,
:host([wrapping-type="Normal"][description]) .ui5-li-singlesel-radiobtn {
	margin-top: 0;
}

:host([wrapping-type="Normal"]) .ui5-li-icon,
:host([wrapping-type="Normal"]) .ui5-li-image {
	display: flex;
	align-self: flex-start;
}

:host([wrapping-type="Normal"][icon-end]) .ui5-li-icon {
	margin-top: var(--_ui5_list_item_content_vertical_offset);
}

:host([wrapping-type="Normal"]) ::slotted([ui5-avatar][slot="image"]) {
	margin-top: 0;
	margin-bottom: 0;
}

:host([wrapping-type="Normal"]) .ui5-li-detailbtn,
:host([wrapping-type="Normal"]) .ui5-li-deletebtn {
	margin-inline-start: .875rem;
}
